<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>找回密码</title>
    
	<meta http-equiv="pragma" content="no-cache">
<link href="images/css.css"  rel="stylesheet" type="text/css" />
	<script type='text/javascript' src='<%=basePath %>/dwr/engine.js'></script>
 	<script type='text/javascript' src='<%=basePath %>/dwr/util.js'></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
 <script type='text/javascript' src='js/jquery.validate.min.js'></script>
 <script type='text/javascript' src='js/common.js'></script>
<style type="text/css">
<!--
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
.STYLE10 {
	font-size: 14px;
	font-weight: bold;
}
.textinput {
	border:1px solid #DBDBDB; height:20px;
}
-->
</style>

<script type="text/javascript">

function checkValid(){
	  var newPWd = $.trim($("#password").val());//重置密码
	  var comfirmPwd = $.trim($("#confirmationPassword").val());
	  var account =  $.trim($("#account").val()); //获取号码

 		//alert("account= "+account);
		if(newPWd == "" || newPWd.length <= 0){
			$("#infoErrorSpan").html("&nbsp;请输入重置密码.");
			$("#resetPassword").focus();
			return false;
		}else{//!isZiMu_Num(newPWd)
			if(newPWd.length < 6){
				$("#infoErrorSpan").html("");
				$("#infoErrorSpan").html("&nbsp;输入的重置密码有误.");
				$("#password").select();
				return false;
			}else{
				$("#infoErrorSpan").html("");
			}
		
			$("#infoErrorSpan").html("");
		}
		if(comfirmPwd == "" || comfirmPwd.length <= 0){
			$("#infoErrorSpan").html("请输入确认密码.");
			$("#confirmationPassword").focus();
			return false;
		}else{
			if(comfirmPwd.length < 6){
				$("#infoErrorSpan").html("输入的确认密码有误.");
				$("#confirmationPassword").select();
				return false;
			}else{
				$("#infoErrorSpan").html("");
			}
			
			$("#infoErrorSpan").html("");
		}
		
		//效验输入的重置密码和确认密码是否一致
		if(newPWd != comfirmPwd){
			$("#infoErrorSpan").html("输入的确认密码和重置密码不一致.");
			$("#confirmationPassword").select();
			 return false;	
		}else{
			$("#infoErrorSpan").html("");
		}
		
		return true;
	
}

  //表单提交
  function modifyPwdSubmit()
  {
  		if(!checkValid()){
  			return false;
  		}else{
  			document.zhmm3Frm.submit();
  		}
  }

function isZiMu_Num(str) {
	//var voChar = /[@!#\$%\^&\*]+/g;
	var voidChar = /^[A-Za-z0-9_]+$/g;

	return voidChar.test(str);
}

</script>

  </head>
  
  <body>
  <!--顶部-->
  <s:action name="showTop" executeResult="true"/>

  <s:form action="userRegister!toRetrievedPwd3.action" name ="zhmm3Frm" id="zhmm3Frm" method="post">
    	<table width="796" height="383" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1">
  <tr>
    <td width="796" height="26" align="left" valign="top"><span class="STYLE1">&nbsp;首页 &gt;&nbsp;&nbsp;找回密码</span></td>
  </tr>
  <tr>
    <td height="357" align="center" valign="top" bgcolor="#FFFFFF" style="border:1px solid #C5C5C5; padding:1px ;"><table width="100%" height="32" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="1%" height="32" background="images/sp_bg.jpg">&nbsp;</td>
        <td width="3%" align="center" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><img src="images/dian.jpg" width="10" height="16" /></td>
        <td width="95%" align="left" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><span class="STYLE3">找回密码</span></td>
        <td width="1%" background="images/sp_bg.jpg">&nbsp;</td>
      </tr>
    </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="8">&nbsp;</td>
          </tr>
        </table>
        <table width="656" height="21" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="208" height="21" align="center" bgcolor="#DEDEDE"><span class="STYLE4">1.填写登录名</span></td>
            <td width="16"><img src="images/H_2.jpg" width="17" height="21" /></td>
            <td width="207" align="center" bgcolor="#DEDEDE" class="STYLE4">2.填写密码查询答案</td>
            <td width="17"><img src="images/H_3.jpg" width="18" height="21" /></td>
            <td width="208" align="center" bgcolor="#F6AD47" class="STYLE4">3.重置密码</td>
          </tr>
        </table>
      <table width="649" height="224" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td height="41" align="center">&nbsp;</td>
        </tr>
          <tr>
            <td height="66" align="center" class="STYLE5"><table width="649" height="183" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td height="18" align="center">
                		<span style="color:red"  id="infoErrorSpan"></span>
                </td>
              </tr>
              <tr>
                <td height="119" align="center" class="STYLE5">
                	<table width="565" height="91" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="125" height="37" align="right">重置密码： </td>
                      <td width="440" align="left">
                      <s:password name="password" id="password" size="20" maxlength="16" cssClass="textinput"/>
                      &nbsp;<span style="color:red">*</span>&nbsp;<span style="color: #F38003">6-16位字符（字母、数字、符号），区分大小写</span>
                      </td>
                    </tr>
                    <tr>
                      <td width="125" height="32" align="right">确认密码：</td>
                      <td width="440" align="left" valign="middle">
                      <input name="confirmationPwd" id="confirmationPassword" type="password" size="20" maxlength="16" style="border:1px solid #DBDBDB; height:22px;"/>&nbsp;<span style="color:red">*</span>
                      </td>
                    </tr>
					<input type="hidden" name="account" id="account" value='<s:property value="#session.retUserObj.account"/>'/>
                </table></td>
              </tr>
              <tr>
                <td height="46" align="center" class="STYLE5">
                <img src="images/tj1.jpg" onclick="javascript:modifyPwdSubmit();" style="cursor:hand" width="149" height="24" />
                </td>
              </tr>
            </table></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
    	</s:form>
<table height="80">
	<tr>
		<td>&nbsp;</td>
	</tr>
</table>
  </body>

</html>
    
    	<!--底部-->
<s:action name="showComment" executeResult="true"/>
<%@include file="foot_end.jsp"%>